local Lua__lddl = fk.CreateSkill {

  name = "Lua__lddl",

  tags = { Skill.Compulsory, },

}

Fk:loadTranslationTable{
    
    ["Lua__lddl"] = "登dua郎",
    ["$Lua__lddl1"] = "新游戏",
    [":Lua__lddl"] = "锁定技，男性角色的回合开始时，你执行一个额外出牌阶段，然后你获得其一半的体力上限和体力值向下取整。",
    
}

Lua__lddl:addEffect(fk.TurnStart, {
  name = "Lua__lddl",
    anim_type = "control",
    frequency = Skill.Compulsory,
    events = {fk.TurnStart},
    can_trigger = function(self, event, target, player, data)
        return player:hasSkill(Lua__lddl.name)  and target.gender == General.Male
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:gainAnExtraPhase(Player.Play,Lua__lddl.name)
        -- 获得目标一半的体力上限和体力值
        local maxhp_gain = math.floor(target.maxHp / 2)
        local hp_gain = math.floor(target.hp / 2)
        if maxhp_gain > 0 then
            room:changeMaxHp(player, maxhp_gain)
        end
        if hp_gain > 0 then
            room:recover({
                who = player,
                num = hp_gain,
                recoverBy = player,
                skillName = Lua__lddl.name
            })
        end
    end,
})

return Lua__lddl